package ua.kpi_java_training.zabrodskyi.module3;

import static org.junit.Assert.*;

import org.junit.Test;

/**
 * @author Maksym Zabrodskyi
 * @version 23-Jun-2013
 */
public class DirectionTest {

	Direction expectedDirection;
	Direction actualDirection;

	@Test
	public void shouldGetDirectionEast() {
		expectedDirection = Direction.EAST;
		actualDirection = Direction.values()[0];
		assertEquals(expectedDirection, actualDirection);
	}

	@Test
	public void shouldGetDirectionWest() {
		expectedDirection = Direction.WEST;
		actualDirection = Direction.values()[1];
		assertEquals(expectedDirection, actualDirection);
	}

	@Test
	public void shouldGetDirectionNorthEast() {
		expectedDirection = Direction.NORTH_EAST;
		actualDirection = Direction.values()[2];
		assertEquals(expectedDirection, actualDirection);
	}

	@Test
	public void shouldGetDirectionNorthWest() {
		expectedDirection = Direction.NORTH_WEST;
		actualDirection = Direction.values()[3];
		assertEquals(expectedDirection, actualDirection);
	}

	@Test
	public void shouldGetDirectionNorthSouthEast() {
		expectedDirection = Direction.SOUTH_EAST;
		actualDirection = Direction.values()[4];
		assertEquals(expectedDirection, actualDirection);
	}

	@Test
	public void shouldGetDirectionNorthSouthWest() {
		expectedDirection = Direction.SOUTH_WEST;
		actualDirection = Direction.values()[5];
		assertEquals(expectedDirection, actualDirection);
	}

	@Test
	public void shouldCountAllDirectionsIsSix() {
		int actualCountAllDirections = Direction.values().length;
		assertEquals(6, actualCountAllDirections);
	}

	@Test
	public void testDirectionToString() {
		String actualDirectionToString = Direction.NORTH_EAST.toString();
		assertEquals("NORTH_EAST", actualDirectionToString);
	}

}
